<template>
	<div>
		<el-dialog title="查看详情" width="800px" @open="open" class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
			<table class="table table-bordered" align="center" width="100%" style="word-break:break-all; margin-bottom:50px;  font-size:13px;">
				<tbody>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_id')}}：</td>
						<td>
							{{form.id}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_name')}}：</td>
						<td>
							{{form.name}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_number')}}：</td>
						<td>
							{{form.number}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_real_name')}}：</td>
						<td>
							{{form.real_name}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_password')}}：</td>
						<td>
							{{form.password}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_safety_password')}}：</td>
						<td>
							{{form.safety_password}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_phone')}}：</td>
						<td>
							{{form.phone}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_encrypt_phone')}}：</td>
						<td>
							{{form.encrypt_phone}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_md5_phone')}}：</td>
						<td>
							{{form.md5_phone}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_card')}}：</td>
						<td>
							{{form.card}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_code')}}：</td>
						<td>
							{{form.code}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_email')}}：</td>
						<td>
							{{form.email}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_we_chat')}}：</td>
						<td>
							{{form.we_chat}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_alipay')}}：</td>
						<td>
							{{form.alipay}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_qq')}}：</td>
						<td>
							{{form.qq}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_reid')}}：</td>
						<td>
							{{form.reid}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_agent')}}：</td>
						<td>
							{{form.agent}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_staff')}}：</td>
						<td>
							{{form.staff}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_mother')}}：</td>
						<td>
							{{form.mother}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_push_team')}}：</td>
						<td>
							{{form.push_team}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_team')}}：</td>
						<td>
							{{form.team}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.UserSimulate_extension_type')}}：</td>
						<td>
							<span v-if="form.extension_type == '0'">推广码</span>
							<span v-if="form.extension_type == '1'">推广链接</span>
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_type')}}：</td>
						<td>
							{{form.type}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_status')}}：</td>
						<td>
							<span v-if="form.status == '1'">开启</span>
							<span v-if="form.status == '0'">关闭</span>
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_photo')}}：</td>
						<td>
							{{form.photo}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.UserSimulate_create_time')}}：</td>
						<td>
							{{parseTime(form.create_time)}}
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_ip')}}：</td>
						<td>
							{{form.ip}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_certified')}}：</td>
						<td>
							{{form.certified}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.UserSimulate_certified_time')}}：</td>
						<td>
							{{parseTime(form.certified_time)}}
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_vip')}}：</td>
						<td>
							{{form.vip}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_bindwechat')}}：</td>
						<td>
							{{form.bindwechat}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_token')}}：</td>
						<td>
							{{form.token}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.UserSimulate_update_time')}}：</td>
						<td>
							{{parseTime(form.update_time)}}
						</td>
				</tr>
				<tr>
						<td class="title" width="100">{{$t('field.UserSimulate_last_time')}}：</td>
						<td>
							{{parseTime(form.last_time)}}
						</td>
				</tr>
				<tr>
						<td class="title" width="100">{{$t('field.UserSimulate_login_time')}}：</td>
						<td>
							{{parseTime(form.login_time)}}
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_login_ip')}}：</td>
						<td>
							{{form.login_ip}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_bank')}}：</td>
						<td>
							{{form.bank}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_activity1')}}：</td>
						<td>
							{{form.activity1}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.UserSimulate_caller')}}：</td>
						<td>
							{{form.caller}}
						</td>
				</tr>
				<tr>
						<td class="title" width="100">{{$t('field.UserSimulate_core_set')}}：</td>
						<td>
							{{form.core_set}}
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_is_trade_channel_agree')}}：</td>
						<td>
							{{form.is_trade_channel_agree}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_app_version')}}：</td>
						<td>
							{{form.app_version}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_peizi_auth')}}：</td>
						<td>
							{{form.peizi_auth}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.UserSimulate_certified_synced')}}：</td>
						<td>
							<span v-if="form.certified_synced == '0'">未同步</span>
							<span v-if="form.certified_synced == '1'">已同步</span>
							<span v-if="form.certified_synced == '2'">同步失败</span>
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_remark')}}：</td>
						<td>
							{{form.remark}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_last_token_time')}}：</td>
						<td>
							{{form.last_token_time}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.UserSimulate_token_time')}}：</td>
						<td>
							{{form.token_time}}
						</td>
				 </tr>
				</tbody>
			</table>
		</el-dialog>
	</div>
</template>
<script>
import { detail , getFieldList } from '@/api/app/usersimulate'
export default {
	name:'userSimulatedetail',
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			form:{
			},
			callers:[],
			core_sets:[],
		}
	},
	watch:{
		show(val){
			if(val){
				getFieldList().then(res => {
					if(res.status == 200){
						this.callers = res.data.callers
						this.core_sets = res.data.core_sets
					}
				})
			}
		}
	},
	methods: {
		open(){
			detail(this.info).then(res => {
				this.form = res.data
			})
		},
		closeForm(){
			this.$emit('update:show', false)
		}
	}
}
</script>
<style  lang="scss">
@import '@/assets/scss/common.scss'
</style>
